/*
 * @Files:
 * @Version: 1.0
 * @Author: wanglu
 * @Date: 2020-03-30 17:01:26
 * @LastEditors: wanglu
 * @LastEditTime: 2020-04-27 17:05:34
 */
import request from '@/utils/request'
/**首页 */
var subscribeService = {
	/**
	 * @description: 获取我的订阅列表
	 * @param {type}
	 * @return:
	 */
	getMySubscribes(param) {
		return request({
			url: '/DoorManagement/subscribe/getMySubscribes',
			method: 'post',
			data: param,
			headers: { showLoading: true }
		})
	},
	/**
	 * @description:根据订阅id查询审批跟踪详情
	 * @param {type}
	 * @return:
	 */

	getTaskSubscribeById(param) {
		return request({
			url: '/DoorManagement/subscribe/getTaskSubscribeById',
			method: 'post',
			params: param
		})
	},
	/**
	 * @description: 取消订阅
	 * @param {type}
	 * @return:
	 */
	canceSubscribe(param) {
		return request({
			url: '/DoorManagement/subscribe/canceSubscribe',
			method: 'post',
			params: param
		})
	},
	/**
	 * @description: 删除订阅
	 * @param {type}
	 * @return:
	 */
	deleteSubscribe(param) {
		return request({
			url: '/DoorManagement/subscribe/deleteSubscribe',
			method: 'post',
			params: param
		})
	},
	/**
	 * @description: 根据订阅id查找文件信息
	 * @param {type}
	 * @return:
	 */
	getFieldsBySubscribeId(param) {
		return request({
			url: '/DoorManagement/contentsField/getFieldsBySubscribeId',
			method: 'post',
			params: param
		})
	},
	/**
	 * @description: 根据订阅id查找接口信息
	 * @param {type}
	 * @return:
	 */
	getTasksBySubscribeId(param) {
		return request({
			url: '/DoorManagement/task/getTasksBySubscribeId',
			method: 'post',
			data: param,
			headers: { showLoading: true }
		})
	},
	/**
	 * @description: 根据订阅id下载接口调用文件
	 * @param {type}
	 * @return:
	 */
	getDownTasksBySubscribeId(param) {
		return request({
			url: '/DoorManagement/task/getDownTasksBySubscribeId',
			method: 'post',
			params: param,
			headers: { showLoading: false }
		})
	},
	/**
	 * @description: 根据订阅id开始下载文件
	 * @param {type}
	 * @return:
	 */
	launchSubscribe(param) {
		return request({
			url: '/tool/launchSubscribe',
			method: 'get',
			params: param,
			headers: { showLoading: false }
		})
	},
	/**
	 * @description: 已下载文件数量
	 * @param {type}
	 * @return:
	 */
	downloadNum(param) {
		return request({
			url: '/bdsp/interManager/execInterface/get/downloadNum',
			method: 'post',
			data: param,
			headers: { showLoading: false }
		})
	},
	/**
	 * @description: 停止下载文件
	 * @param {type}
	 * @return:
	 */
	stopSubscribe(param) {
		return request({
			url: '/tool/stopSubscribe',
			method: 'get',
			params: param,
			headers: { showLoading: false }
		})
	},
	/**
	 * @description: 停止下载文件
	 * @param {type}
	 * @return:
	 */
	getLostMySubscribes() {
		return request({
			url: '/DoorManagement/subscribe/getLostMySubscribes',
			method: 'get',
			headers: { showLoading: false }
		})
	}
}
export { subscribeService }
